1
general::
Also, my goodness. Expressions of shock, surprise, or dismay, as in My God, don't tell me he's dying, or My goodness, what an awful outfit. The first term dates from about 1800; goodness in the variant is a euphemism for God.
American Heritage Idioms